Skip to content

Feature: add OpenMP in XC_Functional_Libxc::v_xc_libxc()#7130

Merged
mohanchen merged 6 commits intodeepmodeling:developfrom
linpeize:libxc_openmp
Apr 10, 2026
Merged

Feature: add OpenMP in XC_Functional_Libxc::v_xc_libxc()#7130
mohanchen merged 6 commits intodeepmodeling:developfrom
linpeize:libxc_openmp

Conversation

@linpeize
Copy link
Copy Markdown

No description provided.

@mohanchen
Copy link
Copy Markdown
Collaborator

I would like to provide a professional suggestion regarding the usage of ModuleBase::Timer.
It is recommended that timers be placed only at the beginning and end of a function, with the timer name consistent with the function name.
It is strongly discouraged to insert timers inside a function, especially using multiple timers within a single function.
If you find it necessary to time only a specific code segment inside a function rather than the entire function, this indicates that the corresponding code block should be refactored. In most cases, the logic being timed should be extracted into a separate function, with the timer applied at the start and end of this new function.
Adding unit tests for such extracted functions is further recommended.

@linpeize
Copy link
Copy Markdown
Author

linpeize commented Apr 8, 2026

I would like to provide a professional suggestion regarding the usage of ModuleBase::Timer. It is recommended that timers be placed only at the beginning and end of a function, with the timer name consistent with the function name. It is strongly discouraged to insert timers inside a function, especially using multiple timers within a single function. If you find it necessary to time only a specific code segment inside a function rather than the entire function, this indicates that the corresponding code block should be refactored. In most cases, the logic being timed should be extracted into a separate function, with the timer applied at the start and end of this new function. Adding unit tests for such extracted functions is further recommended.

The timer added is testing the function of library Libxc.

@mohanchen mohanchen added the Refactor Refactor ABACUS codes label Apr 10, 2026
@mohanchen mohanchen merged commit d0a094b into deepmodeling:develop Apr 10, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants